package com.kitty.game.shidao;

import com.kitty.common.model.Pos;
import com.kitty.game.config.NPC;
import com.kitty.game.role.model.Role;
import com.kitty.listener.EventDispatcher;
import com.kitty.listener.EventType;
import com.kitty.listener.event.EnterMapEvent;
import org.springframework.stereotype.Service;

@Service
public class ShidaoService {
    public void enter(Role role, String msg, NPC npc) {
        Pos pos = role.getPos();
        int oldMapId = pos.getMapId();
        pos.setMapId(38000);
        pos.setX((short) 20);
        pos.setY((short) 20);
        pos.setDir((byte) 1);
        EventDispatcher.getInstance().fireEvent(new EnterMapEvent(EventType.ENTER_MAP, role,oldMapId));
    }
}
